﻿Public Class registrar_cliente
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub BT_atras_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_atras.Click
        Response.Redirect("registrar.aspx")
    End Sub

    Protected Sub BT_registro_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_registro.Click
        L_mensaje.Visible = True
        BT_aceptar.Visible = True
        BT_cancelar.Visible = True

    End Sub

    Protected Sub BT_aceptar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_aceptar.Click
        Dim datacontex As New DCProveedorDataContext
        datacontex.INSERTAR_CLIENTE(Me.TB_nombres.Text, Me.TB_apellidos.Text, Me.TB_tipodoc.Text, Val(Me.TB_numerodoc.Text), Me.TB_direccion.Text, Val(TB_numerotel.Text), Me.TB_correo.Text)
        L_mensaje.Visible = False
        BT_aceptar.Visible = False
        BT_cancelar.Visible = False
        L_registro.Visible = True
        BT_registrado.Visible = True
        TB_nombres.Text = ""
        TB_apellidos.Text = ""
        TB_tipodoc.Text = ""
        TB_numerodoc.Text = ""
        TB_direccion.Text = ""
        TB_numerotel.Text = ""
        TB_correo.Text = ""
        TB_fecha.Text = ""
    End Sub

  
    Protected Sub BT_cancelar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_cancelar.Click
        L_mensaje.Visible = False
        BT_aceptar.Visible = False
        BT_cancelar.Visible = False
    End Sub

    Protected Sub BT_registrado_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_registrado.Click
        L_registro.Visible = False
        BT_registrado.Visible = False
    End Sub
End Class